{{ define "content" }}
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <div class="x_title">
                <h2>LED WiFi</h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_content">
                <form class="form-horizontal form-label-left" role="form" method="post" id="command" novalidate>
                    <div class="item form-group">
                        <label for="state" class="control-label col-md-3 col-sm-3 col-xs-12">
                        {{ i18n "State" . }}
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <div class="">
                                <label>
                                    <input type="checkbox" class="js-switch" name="state"
                                           id="state" {{ if .state.Power }} checked{{ end }} />
                                </label>
                            </div>
                        </div>
                    </div>
                    {{ if ne (len .effects) 0 }}
                    <div class="item form-group">
                        <label for="effect" class="control-label col-md-3 col-sm-3 col-xs-12">
                        {{ i18n "Effect" . }}
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <select id="effect" name="effect" class="form-control select2">
                            {{ range $mode, $title := .effects }}
                                <option value="{{ $mode.Uint8 }}"{{ if eq $mode $.state.Mode }} selected="selected"{{ end }}>{{ i18n $title $ }}</option>
                            {{ end }}
                            </select>
                        </div>
                    </div>
                    {{ end }}
                    <div class="ln_solid"></div>
                    <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                            <button id="send" type="submit" class="btn btn-success">{{ i18n "Apply" . }}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{{ end }}
